/*
 * @Author: JoeLiao
 * @Date: 2024-11-03 00:33:55
 * @LastEditors: JoeLiao 1094153928@qq.com
 * @LastEditTime: 2024-11-14 15:48:38
 * @FilePath: \vue3_admin_master\src\api\user\type.ts
 * @Description:
 *
 * Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
 */
// 登录接口需要携带参数ts类型
export interface loginFormData {
  username: string
  password: string
}

// 定义全部接口返回数据都拥有ts类型
interface ResponseData {
  code: number
  message: string
  ok: boolean
}

//定义登录接口返回数据类型
export interface loginResponseData extends ResponseData {
  data: string
}

// 定义服务器返回用户信息相关的数据类型
export interface userResponseData extends ResponseData {
  code: number
  data: {
    username: string
    avatar: string
  }
}

// 定义获取用户信息返回数据类型
export interface userInfoReponseData extends ResponseData {
  data: {
    routes: string[]
    buttons: string[]
    roles: string[]
    name: string
    avatar: string
  }
}
